<?php

namespace common\models\shop;

use Yii;

/**
 * This is the model class for table "{{%shop_order_extras}}".
 *
 * @property int $id
 * @property int $order_id
 * @property int $product_id
 * @property int $goods_id
 * @property string $name
 * @property string $price
 * @property string $discount
 * @property int $number
 * @property int $created_at
 * @property int $updated_at
 */
class ShopOrderExtras extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%shop_order_extras}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['order_id', 'product_id', 'goods_id', 'number', 'created_at', 'updated_at'], 'integer'],
            [['price', 'discount'], 'number'],
            [['name'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'order_id' => 'Order ID',
            'product_id' => 'Product ID',
            'goods_id' => 'Goods ID',
            'name' => 'Name',
            'price' => 'Price',
            'discount' => 'Discount',
            'number' => 'Number',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }

}
